# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Oliver Jaksch <arch-aur@com-in.de>

pkgname=libretro-mame
pkgver=88634
pkgrel=1
arch=(loong64 x86_64)
pkgdesc='MAME Arcade core'
url=https://github.com/libretro/mame
license=(custom)
groups=(libretro)
depends=(
  alsa-lib
  glibc
  libretro-core-info
  libgl
  zlib
)
makedepends=(
  git
  libglvnd
  python
)
source=(libretro-mame::git+https://github.com/libretro/mame.git)
b2sums=(SKIP)

pkgver() {
  cd libretro-mame
  git rev-list --count HEAD
}

build() {
  cd libretro-mame
  make -f Makefile.libretro
}

package() {
  install -Dm 644 libretro-mame/mame_libretro.so -t "${pkgdir}"/usr/lib/libretro/
  install -Dm 644 libretro-mame/docs/LICENSE -t "${pkgdir}"/usr/share/licenses/libretro-mame/
}

# vim: ts=2 sw=2 et:
